﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreFrame.Core.Orm;

namespace MarchEstate.Manager.BusinesEntity
{
    [Serializable]
    [Table(TableName = "WY_MeterHead", EntityType = EntityType.Table, IsGB = false)]
    public abstract class AbstractMeterHead : CoreFrame.Business.AbstractBusines
    {
        private string _meterheadid;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "MeterHeadId", DataKey = true, IsSingleQuote = true, Match = "Custom:Guid", IsInsert = false)]
        public string MeterHeadId
        {
            get { return _meterheadid; }
            set { _meterheadid = value; }
        }
        private string _billno;//单据号,根据日期生成
        /// <summary>
        /// 单据号,根据日期生成
        /// </summary>
        [Column(FieldName = "BillNo", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string BillNo
        {
            get { return _billno; }
            set { _billno = value; }
        }
        private DateTime _meterdate;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "MeterDate", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public DateTime MeterDate
        {
            get { return _meterdate; }
            set { _meterdate = value; }
        }
        private int _metertype;//0,公摊；1，住宅；2，门面；3，其它
        /// <summary>
        /// 0,公摊；1，住宅；2，门面；3，其它
        /// </summary>
        [Column(FieldName = "MeterType", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public int MeterType
        {
            get { return _metertype; }
            set { _metertype = value; }
        }
        private int _metertype2;//0，水表；1，电表；
        /// <summary>
        /// 0，水表；1，电表；
        /// </summary>
        [Column(FieldName = "MeterType2", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public int MeterType2
        {
            get { return _metertype2; }
            set { _metertype2 = value; }
        }
        private int _completeFlag;
        /// <summary>
        /// 完成标识；0未完成；1已完成抄表
        /// </summary>
        [Column(FieldName = "CompleteFlag", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public int CompleteFlag
        {
            get { return _completeFlag; }
            set { _completeFlag = value; }
        }

        private long _getempid;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "GetEmpId", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public long GetEmpId
        {
            get { return _getempid; }
            set { _getempid = value; }
        }
        private string _getempname;//抄表人名称
        /// <summary>
        /// 抄表人名称
        /// </summary>
        [Column(FieldName = "GetEmpName", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string GetEmpName
        {
            get { return _getempname; }
            set { _getempname = value; }
        }
        private long _empid;//录入操作员ID
        /// <summary>
        /// 录入操作员ID
        /// </summary>
        [Column(FieldName = "EmpId", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public long EmpId
        {
            get { return _empid; }
            set { _empid = value; }
        }
        private string _empname;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "EmpName", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string EmpName
        {
            get { return _empname; }
            set { _empname = value; }
        }

        public abstract bool Save();

        public abstract bool Delete(string _meterHeadId);

        /// <summary>
        /// 查询抄表单据
        /// </summary>
        /// <param name="_completeFlag">是否完成抄表</param>
        /// <param name="bdate">开始时间</param>
        /// <param name="edate">结束时间</param>
        /// <returns></returns>
        public abstract List<AbstractMeterHead> GetMeterHeadList(int meterType, int meterType2, int _completeFlag, DateTime bdate, DateTime edate,PageInfo page);

        /// <summary>
        /// 查询抄表单据
        /// </summary>
        /// <param name="_completeFlag"></param>
        /// <returns></returns>
        public abstract List<AbstractMeterHead> GetMeterHeadList(int meterType, int meterType2, int _completeFlag);

        /// <summary>
        /// 批量创建表单
        /// </summary>
        /// <param name="meterType"></param>
        /// <param name="meterType2"></param>
        public abstract void BatchAddMakeForm(int meterType, int meterType2,int getEmpId,int empId);

        /// <summary>
        /// 审核表单
        /// </summary>
        /// <param name="_meterHeadId"></param>
        /// <returns></returns>
        public abstract bool AuditingMeterform(string _meterHeadId);

        /// <summary>
        /// 审核完成更改为完成标识
        /// </summary>
        /// <param name="_meterHeadId"></param>
        /// <returns></returns>
        public abstract bool UpdateCompleteFlag(string _meterHeadId);
    }
}
